<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>课程详情</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <style>
        body{ background-color: #F6F7F8}
        header{
            background-color: black;
        }
        .flex{display: -webkit-box; display: -webkit-flex; display: flex;}
    </style>
</head>
<body>
<div id="wrap" class="flex-wrap flex-vertical">
    <div id="main" class="flex-con">

    </div>
</div>
</body>
</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common/common.js"></script>
<script type="text/javascript">
    var alivcLivePlayer;
    apiready = function () {
        alivcLivePlayer = api.require('alivcLivePlayer');
        alivcLivePlayer.initPlayer({
            rect:{
                x: 0,
                y: 0,
                w: api.winWidth,
                h: api.winHeight
            }
        },function(ret){
            if (api.systemType != "ios") {
                if (ret.status) {
                    prepare();
                }
            }
        })
        if (api.systemType == "ios") {
            prepare();
        }
        api.openFrame({
            name: 'liveControlFrame',
            url: './liveControlFrame.html',
            bgColor: 'rgba(0,0,0,0)',
            bounces: false,
            rect: {
                x: 0,
                y: 0,
                w: api.winWidth,
                h: api.winHeight,
            }
        });
    }
    
    function prepare() {
        alivcLivePlayer.prepareToPlay({
            url: api.pageParam.live_id,
        },function(ret){
            if (ret.status) {
                alivcLivePlayer.play()
            }
        })
    }
</script>